﻿using Microsoft.Xna.Framework.Input;

namespace Firefly.ExtensionMethods
{
    public static class KeysExtensions
    {
        public static bool IsAlpha(this Keys obj)
        {
            if (obj == Keys.A ||
                obj == Keys.B ||
                obj == Keys.C ||
                obj == Keys.D ||
                obj == Keys.E ||
                obj == Keys.F ||
                obj == Keys.G ||
                obj == Keys.H ||
                obj == Keys.I ||
                obj == Keys.J ||
                obj == Keys.K ||
                obj == Keys.L ||
                obj == Keys.M ||
                obj == Keys.N ||
                obj == Keys.O ||
                obj == Keys.P ||
                obj == Keys.Q ||
                obj == Keys.R ||
                obj == Keys.S ||
                obj == Keys.T ||
                obj == Keys.U ||
                obj == Keys.V ||
                obj == Keys.W ||
                obj == Keys.X ||
                obj == Keys.Y ||
                obj == Keys.Z)
            {
                return true;
            }

            return false;
        }

        public static bool IsNumeric(this Keys obj)
        {
            if (obj == Keys.D0 ||
                obj == Keys.D1 ||
                obj == Keys.D2 ||
                obj == Keys.D3 ||
                obj == Keys.D4 ||
                obj == Keys.D5 ||
                obj == Keys.D6 ||
                obj == Keys.D7 ||
                obj == Keys.D8 ||
                obj == Keys.D9)
            {
                return true;
            }

            return false;
        }
    }
}
